let mySql = require("mysql");
module.exports = {
  db(sql, data, fn) {
    let dbSql = mySql.createConnection({
      host: "localhost",
      port: 3306,
      user: "root",
      password: "root",
      database: "dromProject2",
    });
    dbSql.connect();
    dbSql.query(sql, data, fn);
    dbSql.end();
  },
};
